import 'package:gold/generated/json/base/json_convert_content.dart';
import 'package:gold/model/gold_banner_model.dart';

GoldBannerModel $GoldBannerModelFromJson(Map<String, dynamic> json) {
  final GoldBannerModel goldBannerModel = GoldBannerModel();
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    goldBannerModel.id = id;
  }
  final String? image = jsonConvert.convert<String>(json['image']);
  if (image != null) {
    goldBannerModel.image = image;
  }
  return goldBannerModel;
}

Map<String, dynamic> $GoldBannerModelToJson(GoldBannerModel entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['image'] = entity.image;
  return data;
}

extension GoldBannerModelExtension on GoldBannerModel {
  GoldBannerModel copyWith({
    int? id,
    String? image,
  }) {
    return GoldBannerModel()
      ..id = id ?? this.id
      ..image = image ?? this.image;
  }
}